package com.food.user.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "storefoods")
public class StoreFoodModel {
    /**
     * ID
     */
    @Id
    @Field(type = FieldType.Long,name = "foodInfoId")
    private Long foodInfoId;

    /**
     * 商家ID
     */
    @Field(type = FieldType.Long,name = "foodInfoStoreId")
    private Long foodInfoStoreId;

    /**
     * 菜品名字
     */
    @Field(type = FieldType.Text,name = "foodInfoFoodName",analyzer = "ik_max_word")
    private String foodInfoFoodName;

    /**
     * 详细信息
     */
    @Field(type = FieldType.Text,name = "foodInfoDetailInfo",analyzer = "ik_max_word")
    private String foodInfoDetailInfo;

    /**
     * 售价
     */
    @Field(type = FieldType.Keyword,name = "foodInfoPrice",index = false)
    private String foodInfoPrice;

    /**
     * 封面图片
     */
    @Field(type = FieldType.Keyword,name = "foodInfoCoverPhoto",index = false)
    private String foodInfoCoverPhoto;

    @Field(type = FieldType.Integer,name = "foodInfoState",index = false)
    private Integer foodInfoState;

    @Field(type = FieldType.Long,name = "typeId")
    private Long typeId;

    @Field(type = FieldType.Integer,name = "foodMonthSaleCount")
    private Integer foodMonthSaleCount;

}
